how to use font awesome unicode in css

73

/* link to font awesome */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css");

/* to use font awesome as your content in ::after or ::before */
selector::before {
	content: "\unicode"; /* you can get unicode from the website*/
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* solid => 900 , regular => 400*/
}

Comments

Submit
0 Comments